//
// Created by cychen on 2023/3/14.
//

#ifndef LIST_INCONFIG_H

#include "Const.h"
#include <string>

using namespace std;
#define LIST_INCONFIG_H



class InConfig {
    
private:
    static InConfig *instance;
    bool ring = false;
    int headLimit = -1;
    int tailLimit = -1;
    int rejectLimit = -1;
    int state = STATE_EMPTY;
    string filePath;

    InConfig() = default;
    
public:
    static void resetInstance();

    static InConfig *getInstance();

    void setRing(bool _ring) {
        InConfig::ring = _ring;
    }

    void setHeadLimit(int _headLimit) {
        InConfig::headLimit = _headLimit;
    }

    void setTailLimit(int _tailLimit) {
        InConfig::tailLimit = _tailLimit;
    }

    void setRejectLimit(int _rejectLimit) {
        InConfig::rejectLimit = _rejectLimit;
    }

    void setState(int _state) {
        InConfig::state = _state;
    }

    void setFilePath(const string &_filePath) {
        InConfig::filePath = _filePath;
    }

    bool isRing() const {
        return ring;
    }

    int getHeadLimit() const {
        return headLimit;
    }

    int getTailLimit() const {
        return tailLimit;
    }

    int getRejectLimit() const {
        return rejectLimit;
    }

    int getState() const {
        return state;
    }
};


#endif //LIST_INCONFIG_H
